#ifndef XINLISTEDIT_H
#define XINLISTEDIT_H

//this class is used in CXListView,for display an edit box in a cell unit of the report list view
//author: Terry Tan
//time: 2009.10.22
class CXInListEdit : public CEdit
{
private:
	int m_nRow;
	int m_nCol;
	CString m_strText;
	BOOL m_bESC;

public:
	CXInListEdit();
	CXInListEdit(int nRow,int nCol,CString strText);

	void SetRowIndex(int nRow) { m_nRow = nRow; }
	void SetColIndex(int nCol) { m_nCol = nCol; }
	void SetText(CString strText) { m_strText = strText; }

	int GetRowIndex() const { return m_nRow; }
	int GetColIndex() const { return m_nCol; }
	BOOL GetIsEsc() const { return m_bESC; }

	void CalculateSize();

public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);

protected:
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);

	DECLARE_MESSAGE_MAP()


};

#endif